package com.wkck.controller.frontend;

import com.wkck.exception.BaseException;
import com.wkck.result.Result;
import com.wkck.service.LResumePracticeExperienceService;
import com.wkck.service.LResumeProjectExperienceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: CK
 * @Date: 2024/03/07/13:07
 * @Description:
 */
@Api(value = "项目经历api", tags = "项目经历api")
@Slf4j
@RestController
@RequestMapping("/user/pro")
@CrossOrigin
public class LResumeProExperienceController {

    @Autowired
    private LResumeProjectExperienceService proService;

    /***
    * @Author: CK
    * @Date: 2024/3/7
    * @Param: [id]
    * @Description: 删除简历项目经历
    */
    @DeleteMapping("/remove/{id}")
    @ApiOperation(value = "删除简历项目经历")
    public Result<Boolean> deleteProExperienceById(@PathVariable("id") Long id) {
        log.info("删除简历项目经历id ====> {}", id);
        if (id == null) {
            throw new BaseException("删除异常 ===> 编号为空");
        }
        return Result.success(proService.removeById(id));
    }
}
